home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / utils / sound / players / unix / rplay / rplay.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-23  |  1.6 KB  |  80 lines

  1. /*
  2.  * rplay.h
  3.  *
  4.  * Copyright (c) 1992 by Mark Boyns
  5.  *
  6.  * Permission to use, copy, modify, and distribute this software and its
  7.  * documentation for any purpose and without fee is hereby granted, provided
  8.  * that the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation.  This software is provided "as is" without express or
  11.  * implied warranty.
  12.  */
  13.  
  14. #ifndef    _rplay_h
  15. #define    _rplay_h
  16.  
  17. /*
  18.  * rplay UDP port for non-inetd users
  19.  */
  20. #define RPLAY_PORT        55555
  21.  
  22. /*
  23.  * maximum size of an rplay packet
  24.  */
  25. #define MAX_PACKET        8192
  26.  
  27. /*
  28.  * the rplay attributes
  29.  */ 
  30. #define RPLAY_NULL            0
  31. #define RPLAY_PLAY            1
  32. #define RPLAY_VOLUME_PLAY        2
  33. #define RPLAY_STOP            3
  34. #define RPLAY_PAUSE            4
  35. #define RPLAY_CONTINUE            5
  36. #define RPLAY_APPEND_PLAY        6
  37. #define RPLAY_APPEND_VOLUME_PLAY    7
  38. #define RPLAY_APPEND_STOP        8
  39. #define RPLAY_APPEND_PAUSE        9
  40. #define RPLAY_APPEND_CONTINUE        10
  41.   
  42. /*
  43.  * rplay volume restrictions
  44.  */
  45. #define RPLAY_MIN_VOLUME    0
  46. #define RPLAY_DEFAULT_VOLUME    128
  47. #define RPLAY_MAX_VOLUME    255
  48.  
  49. /*
  50.  * rplay errors used by rplay_errno
  51.  */
  52. #define RPLAY_ERROR_NONE    0
  53. #define RPLAY_ERROR_MEMORY    1
  54. #define RPLAY_ERROR_HOST    2
  55. #define RPLAY_ERROR_SERVICE    3
  56. #define RPLAY_ERROR_CONNECT    4
  57. #define RPLAY_ERROR_SOCKET    5
  58. #define RPLAY_ERROR_ATTRIBUTE    6
  59. #define RPLAY_ERROR_WRITE    7
  60. #define RPLAY_ERROR_CLOSE    8 
  61. #define RPLAY_ERROR_APPEND    9
  62. #define RPLAY_ERROR_PACKET_SIZE    10
  63. #define RPLAY_ERROR_BROADCAST    11
  64.  
  65. /*
  66.  * the RPLAY structure
  67.  */
  68. typedef struct { 
  69.     int    size;
  70.     int    grow;
  71.     int    len;
  72.     char    *buf;
  73. } RPLAY;
  74.  
  75. extern int    rplay_errno;
  76. extern char    *rplay_errlist[];
  77. RPLAY        *rplay_create();
  78.  
  79. #endif    _rplay_h
  80.